package rz.spring.proxy;

import org.aspectj.lang.JoinPoint;//aspectj

public class LogBefore {
	/*
	 * 注意，XML配置不提供参数的支持，若切面里的方法有参数，会报错：
	 * 
	 * org.springframework.beans.factory.BeanCreationException: Error creating
	 * bean with name 'personServiceImpl' defined in class path resource
	 * [applicationContext.xml]: BeanPostProcessor before instantiation of bean
	 * failed; nested exception is
	 * org.springframework.beans.factory.BeanCreationException: Error creating
	 * bean with name
	 * 'org.springframework.aop.aspectj.AspectJPointcutAdvisor#0': Instantiation
	 * of bean failed; nested exception is
	 * org.springframework.beans.BeanInstantiationException: Could not
	 * instantiate bean class
	 * [org.springframework.aop.aspectj.AspectJPointcutAdvisor]: Constructor
	 * threw exception; nested exception is java.lang.IllegalArgumentException:
	 * error at ::0 formal unbound in pointcut
	 */
	/*public void aaa(String aaa) {
		System.out.println("This is log info . By LogBefore");
	}*/
	public void aaa(JoinPoint joinpoint) {
		System.out.println("This is log info " + joinpoint.getThis()
				+ ". By LogBefore");
	}
}
